package com.aios.dao;

import com.aios.entity.UserGroupHasDoor;
import com.aios.entity.UserGroupHasDoorExample;
import com.aios.entity.UserGroupHasDoorKey;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

public interface UserGroupHasDoorMapper {
	int countByExample(UserGroupHasDoorExample example);

	int deleteByExample(UserGroupHasDoorExample example);

	int deleteByPrimaryKey(UserGroupHasDoorKey key);

	int insert(UserGroupHasDoor record);

	int insertSelective(UserGroupHasDoor record);

	List<UserGroupHasDoor> selectByExample(UserGroupHasDoorExample example);

	UserGroupHasDoor selectByPrimaryKey(UserGroupHasDoorKey key);

	int updateByExampleSelective(@Param("record") UserGroupHasDoor record,
			@Param("example") UserGroupHasDoorExample example);

	int updateByExample(@Param("record") UserGroupHasDoor record,
			@Param("example") UserGroupHasDoorExample example);

	int updateByPrimaryKeySelective(UserGroupHasDoor record);

	int updateByPrimaryKey(UserGroupHasDoor record);
	
	@Select("SELECT USER_GROUP_ID as ID FROM user_group_has_door WHERE DOOR_ID = #{id} ORDER BY SORT_ORDER")
	@ResultMap(value = "ExistingGroupsResultMap")
	List<Integer> findExistingGroupList(@Param("id") Integer id);
}